package com.springboot.java.design.component;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author: TongRui乀
 * @Date: 2019/3/6 10:12
 * @description：
 */
@Slf4j
public class MilkTea extends BeverageComponent {

    private Beverage beverage;

    public MilkTea(Beverage beverage) {
        this.beverage = beverage;
    }

    @Override
    public String description() {
        return this.beverage.description() + " 加 牛奶";
    }

    @Override
    public int price() {
        return this.beverage.price() + 10;
    }

    @Override
    public void addSugar() {
        log.info("单独加糖");
    }
}
